Left Termination of the query pattern samefringe_in_2(g, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

gopher(nil, nil).
gopher(cons(nil, Y), cons(nil, Y)).
gopher(cons(cons(U, V), W), X) :- gopher(cons(U, cons(V, W)), X).
samefringe(nil, nil).
samefringe(cons(U, V), cons(X, Y)) :- ','(gopher(cons(U, V), cons(U1, V1)), ','(gopher(cons(X, Y), cons(X1, Y1)), samefringe(V1, Y1))).

Queries:

samefringe(g,g).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
samefringe_in: (b,b) (f,f)
gopher_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → U2_GG(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
GOPHER_IN_GG(cons(cons(U, V), W), X) → U1_GG(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_GG(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_GG(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_AA(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
U3_GG(x1, x2, x3, x4, x5, x6, x7)  =  U3_GG(x7)
U1_GG(x1, x2, x3, x4, x5)  =  U1_GG(x5)
SAMEFRINGE_IN_GG(x1, x2)  =  SAMEFRINGE_IN_GG(x1, x2)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)
U4_AA(x1, x2, x3, x4, x5)  =  U4_AA(x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → U2_GG(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
GOPHER_IN_GG(cons(cons(U, V), W), X) → U1_GG(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_GG(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_GG(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_AA(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
U3_GG(x1, x2, x3, x4, x5, x6, x7)  =  U3_GG(x7)
U1_GG(x1, x2, x3, x4, x5)  =  U1_GG(x5)
SAMEFRINGE_IN_GG(x1, x2)  =  SAMEFRINGE_IN_GG(x1, x2)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)
U4_AA(x1, x2, x3, x4, x5)  =  U4_AA(x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 10 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ ATransformationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

GOPHER_IN_GG(cons, X) → GOPHER_IN_GG(cons, X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ ATransformationProof
QDP
                            ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

cons(X) → cons(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

cons(X) → cons(X)

The TRS R consists of the following rules:none


s = cons(X) evaluates to t =cons(X)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from cons(X) to cons(X).





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))

The TRS R consists of the following rules:

gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x5)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SAMEFRINGE_IN_AAU2_AA(gopher_in_gg(cons, cons))
U2_AA(gopher_out_gg) → U3_AA(gopher_in_gg(cons, cons))
U3_AA(gopher_out_gg) → SAMEFRINGE_IN_AA

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg
gopher_in_gg(cons, X) → U1_gg(gopher_in_gg(cons, X))
U1_gg(gopher_out_gg) → gopher_out_gg

The set Q consists of the following terms:

gopher_in_gg(x0, x1)
U1_gg(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U2_AA(gopher_out_gg) → U3_AA(gopher_in_gg(cons, cons)) at position [0] we obtained the following new rules:

U2_AA(gopher_out_gg) → U3_AA(gopher_out_gg)
U2_AA(gopher_out_gg) → U3_AA(U1_gg(gopher_in_gg(cons, cons)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(gopher_out_gg) → U3_AA(U1_gg(gopher_in_gg(cons, cons)))
SAMEFRINGE_IN_AAU2_AA(gopher_in_gg(cons, cons))
U3_AA(gopher_out_gg) → SAMEFRINGE_IN_AA
U2_AA(gopher_out_gg) → U3_AA(gopher_out_gg)

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg
gopher_in_gg(cons, X) → U1_gg(gopher_in_gg(cons, X))
U1_gg(gopher_out_gg) → gopher_out_gg

The set Q consists of the following terms:

gopher_in_gg(x0, x1)
U1_gg(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule SAMEFRINGE_IN_AAU2_AA(gopher_in_gg(cons, cons)) at position [0] we obtained the following new rules:

SAMEFRINGE_IN_AAU2_AA(U1_gg(gopher_in_gg(cons, cons)))
SAMEFRINGE_IN_AAU2_AA(gopher_out_gg)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SAMEFRINGE_IN_AAU2_AA(gopher_out_gg)
U2_AA(gopher_out_gg) → U3_AA(U1_gg(gopher_in_gg(cons, cons)))
U3_AA(gopher_out_gg) → SAMEFRINGE_IN_AA
SAMEFRINGE_IN_AAU2_AA(U1_gg(gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg) → U3_AA(gopher_out_gg)

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg
gopher_in_gg(cons, X) → U1_gg(gopher_in_gg(cons, X))
U1_gg(gopher_out_gg) → gopher_out_gg

The set Q consists of the following terms:

gopher_in_gg(x0, x1)
U1_gg(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

SAMEFRINGE_IN_AAU2_AA(gopher_out_gg)
U2_AA(gopher_out_gg) → U3_AA(U1_gg(gopher_in_gg(cons, cons)))
U3_AA(gopher_out_gg) → SAMEFRINGE_IN_AA
SAMEFRINGE_IN_AAU2_AA(U1_gg(gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg) → U3_AA(gopher_out_gg)

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg
gopher_in_gg(cons, X) → U1_gg(gopher_in_gg(cons, X))
U1_gg(gopher_out_gg) → gopher_out_gg


s = U2_AA(gopher_out_gg) evaluates to t =U2_AA(gopher_out_gg)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U2_AA(gopher_out_gg)U3_AA(gopher_out_gg)
with rule U2_AA(gopher_out_gg) → U3_AA(gopher_out_gg) at position [] and matcher [ ]

U3_AA(gopher_out_gg)SAMEFRINGE_IN_AA
with rule U3_AA(gopher_out_gg) → SAMEFRINGE_IN_AA at position [] and matcher [ ]

SAMEFRINGE_IN_AAU2_AA(gopher_out_gg)
with rule SAMEFRINGE_IN_AAU2_AA(gopher_out_gg)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
samefringe_in: (b,b) (f,f)
gopher_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg(x1, x2)
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg(x1, x2)
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → U2_GG(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
GOPHER_IN_GG(cons(cons(U, V), W), X) → U1_GG(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_GG(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_GG(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_AA(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg(x1, x2)
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
U3_GG(x1, x2, x3, x4, x5, x6, x7)  =  U3_GG(x7)
U1_GG(x1, x2, x3, x4, x5)  =  U1_GG(x4, x5)
SAMEFRINGE_IN_GG(x1, x2)  =  SAMEFRINGE_IN_GG(x1, x2)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)
U4_AA(x1, x2, x3, x4, x5)  =  U4_AA(x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → U2_GG(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_GG(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
GOPHER_IN_GG(cons(cons(U, V), W), X) → U1_GG(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_GG(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_GG(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_GG(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_GG(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → GOPHER_IN_GG(cons(U, V), cons(U1, V1))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → GOPHER_IN_GG(cons(X, Y), cons(X1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_AA(U, V, X, Y, samefringe_in_aa(V1, Y1))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg(x1, x2)
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
U3_GG(x1, x2, x3, x4, x5, x6, x7)  =  U3_GG(x7)
U1_GG(x1, x2, x3, x4, x5)  =  U1_GG(x4, x5)
SAMEFRINGE_IN_GG(x1, x2)  =  SAMEFRINGE_IN_GG(x1, x2)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)
U4_AA(x1, x2, x3, x4, x5)  =  U4_AA(x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 10 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg(x1, x2)
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

GOPHER_IN_GG(cons(cons(U, V), W), X) → GOPHER_IN_GG(cons(U, cons(V, W)), X)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons
GOPHER_IN_GG(x1, x2)  =  GOPHER_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ ATransformationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

GOPHER_IN_GG(cons, X) → GOPHER_IN_GG(cons, X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ ATransformationProof
QDP
                            ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

cons(X) → cons(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

cons(X) → cons(X)

The TRS R consists of the following rules:none


s = cons(X) evaluates to t =cons(X)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from cons(X) to cons(X).





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))

The TRS R consists of the following rules:

samefringe_in_gg(nil, nil) → samefringe_out_gg(nil, nil)
samefringe_in_gg(cons(U, V), cons(X, Y)) → U2_gg(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
gopher_in_gg(nil, nil) → gopher_out_gg(nil, nil)
gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)
U2_gg(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_gg(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_gg(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_gg(U, V, X, Y, samefringe_in_aa(V1, Y1))
samefringe_in_aa(nil, nil) → samefringe_out_aa(nil, nil)
samefringe_in_aa(cons(U, V), cons(X, Y)) → U2_aa(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))
U2_aa(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_aa(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_aa(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → U4_aa(U, V, X, Y, samefringe_in_aa(V1, Y1))
U4_aa(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_aa(cons(U, V), cons(X, Y))
U4_gg(U, V, X, Y, samefringe_out_aa(V1, Y1)) → samefringe_out_gg(cons(U, V), cons(X, Y))

The argument filtering Pi contains the following mapping:
samefringe_in_gg(x1, x2)  =  samefringe_in_gg(x1, x2)
nil  =  nil
samefringe_out_gg(x1, x2)  =  samefringe_out_gg(x1, x2)
cons(x1, x2)  =  cons
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x5)
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
U3_gg(x1, x2, x3, x4, x5, x6, x7)  =  U3_gg(x7)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
samefringe_in_aa(x1, x2)  =  samefringe_in_aa
samefringe_out_aa(x1, x2)  =  samefringe_out_aa(x1, x2)
U2_aa(x1, x2, x3, x4, x5)  =  U2_aa(x5)
U3_aa(x1, x2, x3, x4, x5, x6, x7)  =  U3_aa(x7)
U4_aa(x1, x2, x3, x4, x5)  =  U4_aa(x5)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(U, V, X, Y, gopher_out_gg(cons(U, V), cons(U1, V1))) → U3_AA(U, V, X, Y, U1, V1, gopher_in_gg(cons(X, Y), cons(X1, Y1)))
U3_AA(U, V, X, Y, U1, V1, gopher_out_gg(cons(X, Y), cons(X1, Y1))) → SAMEFRINGE_IN_AA(V1, Y1)
SAMEFRINGE_IN_AA(cons(U, V), cons(X, Y)) → U2_AA(U, V, X, Y, gopher_in_gg(cons(U, V), cons(U1, V1)))

The TRS R consists of the following rules:

gopher_in_gg(cons(nil, Y), cons(nil, Y)) → gopher_out_gg(cons(nil, Y), cons(nil, Y))
gopher_in_gg(cons(cons(U, V), W), X) → U1_gg(U, V, W, X, gopher_in_gg(cons(U, cons(V, W)), X))
U1_gg(U, V, W, X, gopher_out_gg(cons(U, cons(V, W)), X)) → gopher_out_gg(cons(cons(U, V), W), X)

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons
gopher_in_gg(x1, x2)  =  gopher_in_gg(x1, x2)
gopher_out_gg(x1, x2)  =  gopher_out_gg(x1, x2)
U1_gg(x1, x2, x3, x4, x5)  =  U1_gg(x4, x5)
SAMEFRINGE_IN_AA(x1, x2)  =  SAMEFRINGE_IN_AA
U2_AA(x1, x2, x3, x4, x5)  =  U2_AA(x5)
U3_AA(x1, x2, x3, x4, x5, x6, x7)  =  U3_AA(x7)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U3_AA(gopher_out_gg(cons, cons)) → SAMEFRINGE_IN_AA
SAMEFRINGE_IN_AAU2_AA(gopher_in_gg(cons, cons))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_in_gg(cons, cons))

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg(cons, cons)
gopher_in_gg(cons, X) → U1_gg(X, gopher_in_gg(cons, X))
U1_gg(X, gopher_out_gg(cons, X)) → gopher_out_gg(cons, X)

The set Q consists of the following terms:

gopher_in_gg(x0, x1)
U1_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_in_gg(cons, cons)) at position [0] we obtained the following new rules:

U2_AA(gopher_out_gg(cons, cons)) → U3_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_out_gg(cons, cons))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U3_AA(gopher_out_gg(cons, cons)) → SAMEFRINGE_IN_AA
SAMEFRINGE_IN_AAU2_AA(gopher_in_gg(cons, cons))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_out_gg(cons, cons))

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg(cons, cons)
gopher_in_gg(cons, X) → U1_gg(X, gopher_in_gg(cons, X))
U1_gg(X, gopher_out_gg(cons, X)) → gopher_out_gg(cons, X)

The set Q consists of the following terms:

gopher_in_gg(x0, x1)
U1_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule SAMEFRINGE_IN_AAU2_AA(gopher_in_gg(cons, cons)) at position [0] we obtained the following new rules:

SAMEFRINGE_IN_AAU2_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
SAMEFRINGE_IN_AAU2_AA(gopher_out_gg(cons, cons))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

U3_AA(gopher_out_gg(cons, cons)) → SAMEFRINGE_IN_AA
SAMEFRINGE_IN_AAU2_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_out_gg(cons, cons))
SAMEFRINGE_IN_AAU2_AA(gopher_out_gg(cons, cons))

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg(cons, cons)
gopher_in_gg(cons, X) → U1_gg(X, gopher_in_gg(cons, X))
U1_gg(X, gopher_out_gg(cons, X)) → gopher_out_gg(cons, X)

The set Q consists of the following terms:

gopher_in_gg(x0, x1)
U1_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U3_AA(gopher_out_gg(cons, cons)) → SAMEFRINGE_IN_AA
SAMEFRINGE_IN_AAU2_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(U1_gg(cons, gopher_in_gg(cons, cons)))
U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_out_gg(cons, cons))
SAMEFRINGE_IN_AAU2_AA(gopher_out_gg(cons, cons))

The TRS R consists of the following rules:

gopher_in_gg(cons, cons) → gopher_out_gg(cons, cons)
gopher_in_gg(cons, X) → U1_gg(X, gopher_in_gg(cons, X))
U1_gg(X, gopher_out_gg(cons, X)) → gopher_out_gg(cons, X)


s = SAMEFRINGE_IN_AA evaluates to t =SAMEFRINGE_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

SAMEFRINGE_IN_AAU2_AA(gopher_out_gg(cons, cons))
with rule SAMEFRINGE_IN_AAU2_AA(gopher_out_gg(cons, cons)) at position [] and matcher [ ]

U2_AA(gopher_out_gg(cons, cons))U3_AA(gopher_out_gg(cons, cons))
with rule U2_AA(gopher_out_gg(cons, cons)) → U3_AA(gopher_out_gg(cons, cons)) at position [] and matcher [ ]

U3_AA(gopher_out_gg(cons, cons))SAMEFRINGE_IN_AA
with rule U3_AA(gopher_out_gg(cons, cons)) → SAMEFRINGE_IN_AA

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.